Option Strict Off
Option Explicit On
Module Declaraciones
	
	
	Public Const VERSION As String = "Motor Entersoft 1.00.01"
	Public Const CONFIGFILE As String = "BCSMotorOperacion.ini"
	
	Public Const ResultOK As Short = 0
	Public Const RetStop As Short = 11
	
	Public Const ERROR_ADDPARAMETER_BASE As Short = -100
	Public Const ERROR_ADDPARAMETER_NOVALID As Short = ERROR_ADDPARAMETER_BASE - 1
	Public Const ERROR_ADDPARAMETER_NOTEMPLATE As Short = ERROR_ADDPARAMETER_BASE - 2
	Public Const ERROR_ADDPARAMETER_NOTFOUND As Short = ERROR_ADDPARAMETER_BASE - 3
	Public Const ERROR_ADDPARAMETER_NOTREGS As Short = ERROR_ADDPARAMETER_BASE - 4
	Public Const ERROR_ADDPARAMETER_UNDEFINED As Short = ERROR_ADDPARAMETER_BASE - 5
	
	Public Const ERROR_PARSEOUT_BASE As Short = -200
	Public Const ERROR_PARSEOUT_NOTTEMPLATE As Short = ERROR_PARSEOUT_BASE - 1
	Public Const ERROR_PARSEOUT_PARSINGSUBITEMS As Short = ERROR_PARSEOUT_BASE - 2
	Public Const ERROR_PARSEOUT_UNDEFINED As Short = ERROR_PARSEOUT_BASE - 3
	
	Public Const ERROR_PARSE_BASE As Short = -250
	Public Const ERROR_PARSE_NOTOUTPUT As Short = ERROR_PARSE_BASE - 1
	Public Const ERROR_PARSE_UNDEFINED As Short = ERROR_PARSE_BASE - 2
	
	
	Public Const ERROR_EXECUTE_BASE As Short = -300
	Public Const ERROR_EXECUTE_NOTINFOSRM As Short = ERROR_EXECUTE_BASE - 1
	Public Const ERROR_EXECUTE_UNDEFINED As Short = ERROR_EXECUTE_BASE - 2
	Public Const ERROR_EXECUTE_ERRORSRM As Short = ERROR_EXECUTE_BASE - 3
	Public Const ERROR_EXECUTE_PARSER As Short = ERROR_EXECUTE_BASE - 4
	Public Const ERROR_EXECUTE_NOTINPUT As Short = ERROR_EXECUTE_BASE - 5
	Public Const ERROR_EXECUTE_TYPENOTDEF As Short = ERROR_EXECUTE_BASE - 6
	
	Public Const ERROR_LOADSERVICE_BASE As Short = -400
	Public Const ERROR_LOADSERVICE_NOTFOUND As Short = ERROR_LOADSERVICE_BASE - 1
	Public Const ERROR_LOADSERVICE_TYPENOTDEF As Short = ERROR_LOADSERVICE_BASE - 2
	Public Const ERROR_LOADSERVICE_NOTINFOSRM As Short = ERROR_LOADSERVICE_BASE - 3
	Public Const ERROR_LOADSERVICE_LOADIN As Short = ERROR_LOADSERVICE_BASE - 4
	Public Const ERROR_LOADSERVICE_LOADOUT As Short = ERROR_LOADSERVICE_BASE - 5
	Public Const ERROR_LOADSERVICE_UNDEFINED As Short = ERROR_LOADSERVICE_BASE - 6
	
	Public Const ERROR_LOADINFOSRM_BASE As Short = -500
	Public Const ERROR_LOADINFOSRM_NOTFOUND As Short = ERROR_LOADINFOSRM_BASE - 1
	Public Const ERROR_LOADINFOSRM_UNDEFINED As Short = ERROR_LOADINFOSRM_BASE - 2
	
	Public Const ERROR_LOADTMPLPARMSRM_BASE As Short = -600
	Public Const ERROR_LOADTMPLPARMSRM_NOTFOUND As Short = ERROR_LOADTMPLPARMSRM_BASE - 1
	Public Const ERROR_LOADTMPLPARMSRM_UNDEFINED As Short = ERROR_LOADTMPLPARMSRM_BASE - 2
	
	Public Const ERROR_START_BASE As Short = -700
	Public Const ERROR_START_ADDOPERPARAM As Short = ERROR_START_BASE - 1
	Public Const ERROR_START_ADDUSEROPERPARM As Short = ERROR_START_BASE - 2
	Public Const ERROR_START_LOADSERVICE As Short = ERROR_START_BASE - 3
	Public Const ERROR_START_NOTFOUNDUOC As Short = ERROR_START_BASE - 4
	Public Const ERROR_START_VALIDATE As Short = ERROR_START_BASE - 5
	Public Const ERROR_START_VALIDATEEXT As Short = ERROR_START_BASE - 6
	Public Const ERROR_START_NOTCODLOG As Short = ERROR_START_BASE - 7
	Public Const ERROR_START_SRVLOAD As Short = ERROR_START_BASE - 8
	
	Public Const ERROR_VALIDATING_BASE As Short = -800
	Public Const ERROR_VALIDATING_NOTFILE As Short = ERROR_VALIDATING_BASE - 1
	Public Const ERROR_VALIDATING_NOTCONTENT As Short = ERROR_VALIDATING_BASE - 2
	Public Const ERROR_VALIDATING_NOTFMT As Short = ERROR_VALIDATING_BASE - 3
	Public Const ERROR_VALIDATING_NOTCONTENTFMT As Short = ERROR_VALIDATING_BASE - 4
	Public Const ERROR_VALIDATING_NOTVALID As Short = ERROR_VALIDATING_BASE - 5
	Public Const ERROR_VALIDATING_UNDEFINED As Short = ERROR_VALIDATING_BASE - 6
	Public Const ERROR_VALIDATING_NOTENC As Short = ERROR_VALIDATING_BASE - 7
	Public Const ERROR_VALIDATING_NOTHEADPEN As Short = ERROR_VALIDATING_BASE - 8
	
	Public Const ERROR_SAVE_BASE As Short = -900
	Public Const ERROR_SAVE_INVOKE As Short = ERROR_SAVE_BASE - 1
	Public Const ERROR_SAVE_DATA As Short = ERROR_SAVE_BASE - 2
	Public Const ERROR_SAVE_DATASRM As Short = ERROR_SAVE_BASE - 3
	Public Const ERROR_SAVE_UNDEFINED As Short = ERROR_SAVE_BASE - 4
	
	Public Const ERROR_REMOVE_BASE As Short = -950
	Public Const ERROR_REMOVE_INVOKE As Short = ERROR_REMOVE_BASE - 1
	Public Const ERROR_REMOVE_DATA As Short = ERROR_REMOVE_BASE - 2
	Public Const ERROR_REMOVE_UNDEFINED As Short = ERROR_REMOVE_BASE - 4
	
	Public Const ERROR_GET_BASE As Short = -1050
	Public Const ERROR_GET_UNDEFINED As Short = ERROR_GET_BASE - 1
	
	Public Const ERROR_RECVFILE_BASE As Short = -1150
	Public Const ERROR_RECVFILE_NOTHEAD As Short = ERROR_RECVFILE_BASE - 1
	Public Const ERROR_RECVFILE_NOTPEND As Short = ERROR_RECVFILE_BASE - 2
	Public Const ERROR_RECVFILE_NOTDIR As Short = ERROR_RECVFILE_BASE - 3
	Public Const ERROR_RECVFILE_NOTFILE As Short = ERROR_RECVFILE_BASE - 4
	Public Const ERROR_RECVFILE_NOTROWS As Short = ERROR_RECVFILE_BASE - 5
	Public Const ERROR_RECVFILE_UNDEFINED As Short = ERROR_RECVFILE_BASE - 6
	
	Public Const ERROR_VALFILE_BASE As Short = -1200
	Public Const ERROR_VALFILE_NOTFILE As Short = ERROR_VALFILE_BASE - 1
	Public Const ERROR_VALFILE_NOTROWS As Short = ERROR_VALFILE_BASE - 2
	Public Const ERROR_VALFILE_NOTFORMAT As Short = ERROR_VALFILE_BASE - 3
	Public Const ERROR_VALFILE_NOTROWSFORMAT As Short = ERROR_VALFILE_BASE - 4
	Public Const ERROR_VALFILE_NOTVALID As Short = ERROR_VALFILE_BASE - 5
	Public Const ERROR_VALFILE_UNDEFINED As Short = ERROR_VALFILE_BASE - 6
	
	Public Const ERROR_EXECSQL_UNDEFINED As Short = -1230
	
	Public Const ERROR_PROCFILE_BASE As Short = 1250
	Public Const ERROR_PROCFILE_NOTSERVICE As Short = ERROR_PROCFILE_BASE - 1
	Public Const ERROR_PROCFILE_NOTREG As Short = ERROR_PROCFILE_BASE - 2
	Public Const ERROR_PROCFILE_NOTINFOSERVICE As Short = ERROR_PROCFILE_BASE - 3
	Public Const ERROR_PROCFILE_NOK As Short = ERROR_PROCFILE_BASE - 4
	Public Const ERROR_PROCFILE_UNDEFINED As Short = ERROR_PROCFILE_BASE - 5
	
	Public Const CODIGO_ETAPA_VAL As Short = 1
	Public Const CODIGO_ETAPA_PROC As Short = 2
	
	Public Const ESTADO_TAREA_PEND As Short = 0
	Public Const ESTADO_TAREA_INIT As Short = 10
	Public Const ESTADO_TAREA_RECV As Short = 1
	Public Const ESTADO_TAREA_RECV_NOK As Short = 2
	Public Const ESTADO_TAREA_RECV_OK As Short = 3
	Public Const ESTADO_TAREA_VAL As Short = 4
	Public Const ESTADO_TAREA_VAL_NOK As Short = 5
	Public Const ESTADO_TAREA_VAL_OK As Short = 6
	Public Const ESTADO_TAREA_PROC As Short = 7
	Public Const ESTADO_TAREA_PROC_NOK As Short = 8
	Public Const ESTADO_TAREA_PROC_OK As Short = 9
	Public Const ESTADO_TAREA_STOP As Short = 11
	Public Const ESTADO_TAREA_RELOAD As Short = 12
	Public Const ESTADO_TAREA_RELOAD_ERR As Short = 13
	
	Public Const ESTADO_ARCHIVO_PEND As Short = 0
	Public Const ESTADO_ARCHIVO_NOTDIR As Short = 1
	Public Const ESTADO_ARCHIVO_NOTFILE As Short = 2
	Public Const ESTADO_ARCHIVO_RECV As Short = 3
	Public Const ESTADO_ARCHIVO_RECV_NOTROWS As Short = 4
	Public Const ESTADO_ARCHIVO_RECV_OK As Short = 5
	
	Public Const ESTADO_ETAPA_REGISTRO_VAL_ERRCOLS As Short = 1
	Public Const ESTADO_ETAPA_REGISTRO_VAL_NROCOLS As Short = 2
	Public Const ESTADO_ETAPA_REGISTRO_VAL_OK As Short = 3
	
	Public Const ESTADO_ETAPA_REGISTRO_VAL_COL_NOTNUMERIC As Short = 4
	Public Const ESTADO_ETAPA_REGISTRO_VAL_COL_NOTDATE As Short = 5
	Public Const ESTADO_ETAPA_REGISTRO_VAL_COL_OK As Short = 6
	
	Public Const ESTADO_ETAPA_REGISTRO_VAL_COL_NOTRUT As Short = 7
	Public Const ESTADO_ETAPA_REGISTRO_VAL_COL_RUTNOTREFDV As Short = 8
	Public Const ESTADO_ETAPA_REGISTRO_VAL_COL_REFDVNULL As Short = 9
	Public Const ESTADO_ETAPA_REGISTRO_VAL_COL_NOTINRANGE As Short = 10
	
	Public Const ESTADO_ETAPA_VAL As Short = 7
	Public Const ESTADO_ETAPA_VAL_ERRROWS As Short = 8
	Public Const ESTADO_ETAPA_VAL_OK As Short = 9
	
	Public Const ESTADO_ETAPA_PROC As Short = 18
	Public Const ESTADO_ETAPA_PROC_NOTREGS As Short = 10
	Public Const ESTADO_ETAPA_PROC_NOTINFOSERVICE As Short = 11
	Public Const ESTADO_ETAPA_PROC_EJECUTANDO As Short = 12
	Public Const ESTADO_ETAPA_PROC_NOK As Short = 13
	Public Const ESTADO_ETAPA_PROC_ALLERROR As Short = 14
	Public Const ESTADO_ETAPA_PROC_INCOMPL As Short = 15
	Public Const ESTADO_ETAPA_PROC_NOTSERVICES As Short = 26
	Public Const ESTADO_ETAPA_PROC_OK As Short = 16
	
	Public Const ESTADO_REGISTRO_NOTLOADMAPPING As Short = 17
	Public Const ESTADO_REGISTRO_INICIADO As Short = 19
	Public Const ESTADO_REGISTRO_EXECERR As Short = 20
	Public Const ESTADO_REGISTRO_OK As Short = 21
	
	Public Const ESTADO_REGISTRO_SERVICO_INICIADO As Short = 22
	Public Const ESTADO_REGISTRO_SERVICO_NOTREQ As Short = 23
	Public Const ESTADO_REGISTRO_SERVICO_NOK As Short = 24
	Public Const ESTADO_REGISTRO_SERVICO_ERREXEC As Short = 27
	Public Const ESTADO_REGISTRO_SERVICO_OK As Short = 25
	
	Public Const ORIGEN_DATO_OPER_VALORFIJO As Short = 1
	Public Const ORIGEN_DATO_OPER_SERVICE As Short = 2
	Public Const ORIGEN_DATO_OPER_USUARIO As Short = 3
	Public Const ORIGEN_DATO_OPER_EXCLUIR As Short = 4
	Public Const ORIGEN_DATO_OPER_NULL As Short = 5
	Public Const ORIGEN_DATO_OPER_SINCONFIG As Short = 6
	Public Const ORIGEN_DATO_OPER_INFOUSR As Short = 7
	
	Public Const ORIGEN_DATO_OPERUSR_SINCONFIG As Short = 0
	Public Const ORIGEN_DATO_OPERUSR_VALORFIJO As Short = 1
	Public Const ORIGEN_DATO_OPERUSR_EXCEL As Short = 2
	Public Const ORIGEN_DATO_OPERUSR_FECHASYS As Short = 3
	Public Const ORIGEN_DATO_OPERUSR_HORASYS As Short = 4
	
	Public Const ESTADO_OPERACION_USUARIO_VIGENTE As Short = 0
	Public Const ESTADO_OPERACION_USUARIO_NOVIGENTE As Short = 1
	Public Const ESTADO_OPERACION_USUARIO_ELIMINADO As Short = 2

    Public ConnNumber As Short
	
	Public lngErr As Integer
	
	Public Enum TypeParameterEnum
		TypeParameterRequest = 0
		TypeParameterResponse = 1
	End Enum
	
	Public Enum TypeDataParameterEnum
		TypeDataParameterText = 0
		TypeDataParameterNumeric = 1
		TypeDataParameterDateTime = 2
		TypeDataParameterComposed = 3
		TypeDataParameterOcurrence = 4
		TypeDataParameterNumericSRM = 5
	End Enum
	
	Public Enum TipoOcurrenciasEnum
		toSinOcurrencias = 0
		toParametroContexto = 1
		toValorFijo = 2
	End Enum
	
    Public Enum TypeServiceEnum
        TypeServiceSRM = 0
    End Enum
	
    Public Enum TipoContenidoServicioEnum
        tcsParametrosServicio = 0
        tcsParametroCompuesto = 1
        tcsParametrosOcurrencias = 2
    End Enum
	
    Public Enum StateServiceEnum
        StateServiceActive = 0
        StateServiceInactive = 1
    End Enum
	
    Public Structure PKParameter
        Dim CodServicio As Integer
        Dim TipoIO As Integer
        Dim CodSeccion As Integer
        Dim CodParam As Integer
        Dim Index As Short
        Dim Nombre As String
        Dim FKParam As String
    End Structure
End Module